home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-20 | 469 b | 30 lines | [TEXT/RLAB] |
- BREAK:
-
- The break statement functions similar to the C break. The
- break statement provides an early exit from the enclosing for,
- or while loop. For example:
-
- > while ( i < 100 ) {
- > if(i == 10) { break; }
- > i++;
- > }
- > i
- i =
- 10
- //
- // OR
- //
-
- > i=0;j=0;
- > while (i < 5)
- > {
- > while (j < 5) { if (j == 3) { break } j++; }
- > i++;
- > } i j
- i =
- 5
- j =
- 3
-
- See Also: CONTINUE, FOR, WHILE
-